#include "stdafx.h"
#include "UICheckBox.h"

namespace dui
{
	LPCTSTR UICheckBox::GetClass() const
	{
		return DUI_CTL_CHECKBOX;
	}

	LPVOID UICheckBox::GetInterface(LPCTSTR pstrName)
	{
		if( _tcscmp(pstrName, DUI_CTL_CHECKBOX) == 0 ) return static_cast<UICheckBox*>(this);
		return UIRadioButton::GetInterface(pstrName);
	}

	void UICheckBox::SetCheck(bool bCheck, bool bTriggerEvent)
	{
		Selected(bCheck, bTriggerEvent);
	}

	bool  UICheckBox::GetCheck() const
	{
		return IsSelected();
	}
}
